<?php
/**
 * FastApp.
 * 10/22/24
 * @Author deepsea159
 * @Contact telegram:deepsea159
 */

namespace App\Game\Api\Controller;

namespace App\Game\Api\Controller;

use App\Fastapp\Api\Controller\ApiController;
use App\Fastapp\Aspect\ApiAuth;
use App\Game\Api\Service\GradientService;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\GetMapping;
use Psr\Http\Message\ResponseInterface;

#[Controller('api/game/gradient'), ApiAuth]
class GradientController extends ApiController
{
    #[Inject]
    public GradientService $service;


    #[GetMapping('invite')]
    public function invite(): ResponseInterface
    {
        return $this->success($this->service->invite());
    }


    #[GetMapping('activeChildren')]
    public function activeChildren(): ResponseInterface
    {
        return $this->success($this->service->activeChildren());
    }
}